package fm.last.api
{
    import fm.last.BaseTC;
    

    public class UserAPITest extends BaseTC
    {
        
        
        public function UserAPITest()
        {
            super();

            addTest("testGetEvents");
            addTest("testGetFriends");
            addTest("testGetInfo");
            addTest("testGetLovedTracks");
            addTest("testGetNeighbours");
            addTest("testGetPastEvents");
            addTest("testGetPlaylists");
            addTest("testGetRecentTracks");
            addTest("testGetRecommendedArtists");
            addTest("testGetRecommendedEvents");
            addTest("testGetShouts");
            addTest("testGetTopAlbums");
            addTest("testGetTopArtists");
            addTest("testGetTopTags");
            addTest("testGetTopTracks");
            addTest("testGetWeeklyAlbumChart");
            addTest("testGetWeeklyArtistChart");
            addTest("testGetWeeklyChartList");
            addTest("testGetWeeklyTrackChart");
            
            // open the comment if you want to test it
            //addTest("testShout");                        
        }
     
     
        public function testGetEvents():void 
        {
            lfm_service.user.getEvents(expectedPattern("/lfm/events"), unexpectedError, "mokele");
        }
        
        public function testGetFriends():void 
        {
            lfm_service.user.getFriends(expectedPattern("/lfm/friends"), unexpectedError, "rj");
            lfm_service.user.getFriends(expectedPattern("/lfm/friends"), unexpectedError, "rj", true);
        }
        
        public function testGetInfo():void 
        {
            lfm_service.user.getInfo(expectedPattern("/lfm/user/name"), unexpectedError);
        }
        
        public function testGetLovedTracks():void 
        {
            lfm_service.user.getLovedTracks(expectedPattern("/lfm/lovedtracks"), unexpectedError, "rj");
        }
        
        public function testGetNeighbours():void 
        {
            lfm_service.user.getNeighbours(expectedPattern("/lfm/neighbours"), unexpectedError, "rj");
        }
        
        public function testGetPastEvents():void 
        {
            lfm_service.user.getPastEvents(expectedPattern("/lfm/events"), unexpectedError, "rj");
        }
        
        public function testGetPlaylists():void 
        {
            lfm_service.user.getPlaylists(expectedPattern("/lfm/playlists"), unexpectedError, "rj");
        }
        
        public function testGetRecentTracks():void 
        {
            lfm_service.user.getRecentTracks(expectedPattern("/lfm/recenttracks"), unexpectedError, "rj");
        }
        
        public function testGetRecommendedArtists():void 
        {
            lfm_service.user.getRecommendedArtists(expectedPattern("/lfm/recommendations"), unexpectedError);
        }
        
        public function testGetRecommendedEvents():void 
        {
            lfm_service.user.getRecommendedEvents(expectedPattern("/lfm", /status="ok"/), unexpectedError);
        }
        
        public function testGetShouts():void 
        {
            lfm_service.user.getShouts(expectedPattern("/lfm/shouts"), unexpectedError, "rj");
        }
        
        public function testGetTopAlbums():void 
        {
            lfm_service.user.getTopAlbums(expectedPattern("/lfm/topalbums"), unexpectedError, "rj");
        }
                             
        public function testGetTopArtists():void
        {
            lfm_service.user.getTopArtists(expectedPattern("/lfm/topartists",/\S/), unexpectedError, "easylin");            
            lfm_service.user.getTopArtists(unexpectedComplete, expectedError, "I_Bet_No_Such_User_");
        }       
        
        public function testGetTopTags():void 
        {
            lfm_service.user.getTopTags(expectedPattern("/lfm/toptags"), unexpectedError, "rj");
        }
        
        public function testGetTopTracks():void 
        {
            lfm_service.user.getTopTracks(expectedPattern("/lfm/toptracks"), unexpectedError, "rj");
        }
        
        public function testGetWeeklyAlbumChart():void 
        {
            lfm_service.user.getWeeklyAlbumChart(expectedPattern("/lfm/weeklyalbumchart"), unexpectedError, "rj");
        }
        
        public function testGetWeeklyArtistChart():void 
        {
            lfm_service.user.getWeeklyArtistChart(expectedPattern("/lfm/weeklyartistchart"), unexpectedError, "rj");
        }
        
        public function testGetWeeklyChartList():void 
        {
            lfm_service.user.getWeeklyChartList(expectedPattern("/lfm/weeklychartlist"), unexpectedError, "rj");
        }
        
        public function testGetWeeklyTrackChart():void 
        {
            lfm_service.user.getWeeklyTrackChart(expectedPattern("/lfm/weeklytrackchart"), unexpectedError, "rj");
        }
        
        public function testShout():void 
        {
            lfm_service.user.shout(okNoContent, unexpectedError, "vixplore", "shout myself");
        }
             
    }
}